package org.kgc.alanhealth.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName hospital_healthmanage
 */
@Data
public class HospitalHealthmanage implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 姓名
     */
    private String healthName;

    /**
     * 身份证号
     */
    private String idcard;

    /**
     * 
     */
    private Integer gender;

    /**
     * 出生日期
     */
    private String birthday;

    /**
     * 身高
     */
    private Double height;

    /**
     * 体重
     */
    private Double weight;

    /**
     * 手机号码
     */
    private String phone;

    /**
     * 与用户的关系（父母、子女、配偶、其他）
     */
    private Integer relation;

    /**
     * 既往病史（取自既往病史表，可为空）
     */
    private Integer anamnesisid;

    /**
     * 过敏史（取自过敏史表，可为空）
     */
    private Integer allergyid;

    /**
     * 关联用户id
     */
    private Integer userid;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalHealthmanage other = (HospitalHealthmanage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHealthName() == null ? other.getHealthName() == null : this.getHealthName().equals(other.getHealthName()))
            && (this.getIdcard() == null ? other.getIdcard() == null : this.getIdcard().equals(other.getIdcard()))
            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getRelation() == null ? other.getRelation() == null : this.getRelation().equals(other.getRelation()))
            && (this.getAnamnesisid() == null ? other.getAnamnesisid() == null : this.getAnamnesisid().equals(other.getAnamnesisid()))
            && (this.getAllergyid() == null ? other.getAllergyid() == null : this.getAllergyid().equals(other.getAllergyid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHealthName() == null) ? 0 : getHealthName().hashCode());
        result = prime * result + ((getIdcard() == null) ? 0 : getIdcard().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getRelation() == null) ? 0 : getRelation().hashCode());
        result = prime * result + ((getAnamnesisid() == null) ? 0 : getAnamnesisid().hashCode());
        result = prime * result + ((getAllergyid() == null) ? 0 : getAllergyid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", healthName=").append(healthName);
        sb.append(", idcard=").append(idcard);
        sb.append(", gender=").append(gender);
        sb.append(", birthday=").append(birthday);
        sb.append(", height=").append(height);
        sb.append(", weight=").append(weight);
        sb.append(", phone=").append(phone);
        sb.append(", relation=").append(relation);
        sb.append(", anamnesisid=").append(anamnesisid);
        sb.append(", allergyid=").append(allergyid);
        sb.append(", userid=").append(userid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}